﻿using System;
using System.Windows;
using System.Windows.Threading;
using Automator.Windows;

namespace Automator
{
    public partial class App : Application
    {
        private void Application_DispatcherUnhandledException(object sender, DispatcherUnhandledExceptionEventArgs e)
        {
            e.Handled = true;
            ExceptionWindow window = new ExceptionWindow(e.Exception);
            if (Application.Current.MainWindow.IsLoaded)
                window.Owner = Application.Current.MainWindow;
            window.ShowDialog();
        }
    }
}
